<?php session_start(); 
	if (isset($_GET["logout"])) session_destroy();
    
    $arr_localhost = array('localhost', '127.0.0.1');
    if (!in_array($_SERVER['HTTP_HOST'],$arr_localhost)) $host = "http://www.clasesonline.com.ar/sai/";
    else $host = "http://localhost/cov/sai/";
    
    if (isset($_SESSION['login'])) header('Location: '.$host);
    //deberia validar que lo guardado en login es valido!
    
	require_once('config/configuration.php');
	require_once('model/login.class.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html>
<!--[if lt IE 7]>      <html lang="es" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html lang="es" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html lang="es" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="es" class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Autenticación - SAI</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        
        <link rel="stylesheet" href="styles/normalize.css">
        <link rel="stylesheet" href="styles/common.css">
        <link rel="stylesheet" href="styles/main.css">
        <?php
            if (isset($_GET['action']) && !empty($_GET['action'])) {
                switch ($_GET['action']) {
                    case 'recover': echo '<link rel="stylesheet" href="styles/recover-password.css">'; break;
                    default: echo '<link rel="stylesheet" href="styles/login.css">'; break;
                }
            } else echo '<link rel="stylesheet" href="styles/login.css">';
        ?>        
        <script src="scripts/vendor/modernizr-2.6.2.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
        <?php
            if (isset($_GET['action']) && !empty($_GET['action'])) {
                switch ($_GET['action']) {
                    case 'recover': require_once('actions/recover/index.php'); break;
                    default: require_once('actions/login/index.php'); break;
                }
            } else require_once('actions/login/index.php');
        ?>
        <footer>
            <a href="">Home</a>
            <a href="">Comunidad</a>
            <a href="">Acerca de la herramienta</a>
            <a href="">Teléfonos de contacto</a>
            <a href="">Ayuda</a>
        </footer>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="scripts/vendor/jquery-1.10.2.min.js"><\/script>')</script>
        <script src="scripts/plugins.js"></script>
        <script src="scripts/main.js"></script>

        <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. 
        <script>
            (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
            function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
            e=o.createElement(i);r=o.getElementsByTagName(i)[0];
            e.src='//www.google-analytics.com/analytics.js';
            r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
            ga('create','UA-XXXXX-X');ga('send','pageview');
        </script>-->
    </body>
</html>
